<%@ page pageEncoding="UTF-8" language="java"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%
	String url = request.getParameter("url");
	int items = Integer.parseInt(request.getParameter("items"));
%>
<pg:pager url="<%=url%>" items="<%=items%>" maxIndexPages="10"
	maxItems="15" export="currentPageNumber=pageNumber">
	<pg:first>
		<a href="${pageUrl}" class="btn btn-primary  btn-xs">首页</a>
	</pg:first>
	<pg:prev>
		<a href="${pageUrl}" class="btn btn-primary  btn-xs">上一页</a>
	</pg:prev>
	<pg:pages>
		<c:choose>
			<c:when test="${currentPageNumber eq pageNumber}">
				<a class="btn btn-info btn-xs">${pageNumber}</a>
			</c:when>
			<c:otherwise>
				<a href="${pageUrl}" class="btn btn-primary  btn-xs">${pageNumber}</a>
			</c:otherwise>
		</c:choose>
	</pg:pages>
	<pg:next><a href="${pageUrl}" class="btn btn-primary  btn-xs">下一页</a></pg:next>
	<pg:last><a href="${pageUrl}" class="btn btn-primary  btn-xs">尾页</a></pg:last>
</pg:pager>
